if(!!window.$ && typeof $=='function'){ $(function(){ $.post('/',{},function(res){ alert('Request has success'); }); }); };